package gps.autocomplete;

import java.util.Date;
import javax.faces.bean.ManagedBean;
import javax.faces.bean.ViewScoped;

/**
 *
 * @author avbravo
 */
@ManagedBean(name = "gps_autoCompleteBeans")
@ViewScoped
public class Beans {

    private gps.general.Beans generalBeans = new gps.general.Beans();

    public Beans() {
    }

    public Beans(int id, String imei, String numero_serie, String marca, String modelo, String nombre, int tipo, String detalle, Date caducidad) {
        generalBeans.setId(id);
        generalBeans.setImei(imei);
        generalBeans.setNumero_serie(numero_serie);
        generalBeans.setMarca(marca);
        generalBeans.setModelo(modelo);
        generalBeans.setNombre(nombre+" ");
        generalBeans.setTipo(tipo); 
        generalBeans.setDetalle(detalle+" ");
        generalBeans.setCaducidad(caducidad);
    }

    private String strScape(String str) {
        str = str.trim();
        str = str.replace("'", "''");
        str = str.replace("\\", "\\\\");
        return str;
    }

    /**
     * @return the generalBeans
     */
    public gps.general.Beans getGeneralBeans() {
        return generalBeans;
    }

    /**
     * @param generalBeans the generalBeans to set
     */
    public void setGeneralBeans(gps.general.Beans generalBeans) {
        this.generalBeans = generalBeans;
    }
}
